package com.huopaolan.yohuoshop.Mvp.Model;

import com.huopaolan.lib_core.Http.MResponseManager;
import com.huopaolan.lib_core.Mvp.Model.BaseModel;
import com.huopaolan.yohuoshop.Bean.ShowEntity;
import com.huopaolan.yohuoshop.Bean.StrollCommunityEntity;
import com.huopaolan.yohuoshop.Bean.CommunityEntity;
import com.huopaolan.yohuoshop.Mvp.Contract.CommunityFragmentContract;
import com.huopaolan.yohuoshop.NetWork.API;

import javax.inject.Inject;

import io.reactivex.Observable;

public class CommunityFragmentModel extends BaseModel implements CommunityFragmentContract.CommunityIModel, CommunityFragmentContract.CommunityWriteIModel, CommunityFragmentContract.CommunityShowIModel {
    @Inject
    public CommunityFragmentModel() {
    }

    @Override
    public Observable<CommunityEntity> community_request(String request) {
        return MResponseManager.obtainRetrofit(API.class).see_list_request(request);
    }

    @Override
    public Observable<StrollCommunityEntity> community_write_request(String request) {
        return MResponseManager.obtainRetrofit(API.class).community_list_request(request);
    }

    @Override
    public Observable<ShowEntity> community_show_request(String request) {
        return MResponseManager.obtainRetrofit(API.class).show_list_request(request);
    }

    @Override
    public void destroy() {

    }
}
